package com.example.demo.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author zhangjw
 * @date 2022年04月20日 11:29
 */
@Component
public class TestLiner implements CommandLineRunner {
    @Autowired
    @Qualifier("prestoTemplate")
    JdbcTemplate jt;

    @Override
    public void run(String... args) throws Exception {
        Develop develop = SpringUtils.getBean("developImpl");
        develop.test();
        develop = SpringUtils.getBean("sdf");
        develop.test();
//        List<Map<String, Object>> list = jt.queryForList("SELECT  * from mysql.dep.dmm_metrics");
//        List<Map<String, Object>> list = jt.queryForList("SELECT  * from hive.opt.sys_config_krtest3");
//        for (Map<String, Object> map : list) {
//            System.out.println(map.toString());
//        }
    }
}